<html>
    <head>
        <title>
            Test UMS Servide
        </title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    </head>
    <body>

<?php
require_once('../lib/nusoap/nusoap.php');
$client = new soapclient('http://127.0.0.1/SEEKEREST/UMS/service/LoginService.php?wsdl', true);
$err = $client->getError();
if ($err) {
    echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
// Call the SOAP method
$dateTime = date("Y-m-d h:i:s A");
$request = array();
$request['loginRequestHeader'] = array( 'refId' => '00001', 'dateTime' => $dateTime);
$request['loginRequestDetail'] = array( 'username' => 'aot.maha@gmail.com', 'password' => 'password');

$result = $client->call('LoginOperation.login', array('loginRequest' => $request));


// Check for a fault
if ($client->fault) {
    echo '<h2>Fault</h2><pre>';
    print_r($result);
    echo '</pre>';
} else {
    // Check for errors
    $err = $client->getError();
    if ($err) {
        // Display the error
        echo '<h2>Error</h2><pre>' . $err . '</pre>';
    } else {
        // Display the result
        echo '<h2>Result</h2><pre>';
        print_r($result);
    echo '</pre>';
    }
}
?>

        
    </body>
</html>

